import Vue from "vue"
import dayjs from "dayjs"
var relativeTime = require('dayjs/plugin/relativeTime')
require("dayjs/locale/zh-cn")
dayjs.extend(relativeTime)
dayjs.locale('zh-cn')
var obj = {
    formatTime: (val) => {
        return dayjs(val).format('YYYY-MM-DD/  H:mm:ss ')
    },
    formatTime2: () => {
        return dayjs('2024-01-12T03:38:09.000Z').format('YYYY/ MM/DD/  H:mm ')
    }
}

// Vue.filter("datafrom", obj.datafrom)
// Vue.filter("datafrom2", obj.datafrom2)
for (let key in obj) {
    Vue.filter(key, obj[key])
}